﻿﻿using Owin;
using Microsoft.Owin.Extensions;

namespace WebApplication1
{
    public class Config<T>
    {
        public T GetConfig(dynamic t)
        {
            return t;
        }
    }
    public class Startup
    {
       public void Configuration(IAppBuilder appBuilder)
       {
            DDD.config config = new DDD.config();
            Config<DDD.config> configM = new WebApplication1.Config<DDD.config>();
            var a= configM.GetConfig(config);

#if MicrosoftOwin
            appBuilder.Use<NFinal.Middleware>();
            //Microsoft.Owin.StaticFiles.ContentTypes.FileExtensionContentTypeProvider provider = new Microsoft.Owin.StaticFiles.ContentTypes.FileExtensionContentTypeProvider();
            //provider.Mappings.Add(".svgz", "image/svg+xml");
            //appBuilder.UseStaticFiles(new Microsoft.Owin.StaticFiles.StaticFileOptions {
            //    ServeUnknownFileTypes = true,
            //    DefaultContentType = "application/octet-stream",
            //    ContentTypeProvider=provider
            //});
            appBuilder.UseStageMarker(PipelineStage.Authenticate);
#endif
#if NFinalOwin
            appBuilder.Use<NFinal.NFinalOwinMiddleware>();
            appBuilder.UseStageMarker(PipelineStage.Authenticate);
#endif
        }
    }
}